/**
 * ApplicationException.java
 *
 * $LastChangedBy: allen $
 * $LastChangedDate: 2007-12-07 15:51:23 +0800 $
 * $Revision: 1405 $
 */
package com.myspace.common.exception;

import java.util.List;

/**
 * This class represents application exceptions (functional errors), i.e., the
 * exceptions that users can do something to solve. It's a checked exception, so
 * the caller must catch or throw this exception.
 *
 * @author Allen.Chen
 */
public class ApplicationException extends Exception {
	/** Serial Version UID */

	private static final long serialVersionUID = 20071113L;

	@SuppressWarnings("unchecked")
	private List messages = null;

	public ApplicationException() {
		super();
	}

	@SuppressWarnings("unchecked")
	public ApplicationException(List messages) {
		super();
		this.messages = messages;
	}

	public ApplicationException(String message) {
		super(message);
	}

	public ApplicationException(String message, Throwable cause) {
		super(message, cause);
	}

	public ApplicationException(Throwable cause) {
		super(cause);
	}

	@SuppressWarnings("unchecked")
	public List getMessages() {
		return messages;
	}

	@SuppressWarnings("unchecked")
	public void setMessages(List messages) {
		this.messages = messages;
	}
}
